﻿<UserControl x:Class="QuailDashboard.View.Controls.SelectBinaryPackageControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:QuailControls="clr-namespace:QuailDashboard.View.Controls" 
    Width="400" Height="400">
    <Grid x:Name="LayoutRoot" Background="White" Loaded="LayoutRoot_Loaded">
        <Grid.RowDefinitions>
            <RowDefinition Height="45"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <Border x:Name="borderBorder"
                Grid.Row="0"
                Grid.RowSpan="3"
                CornerRadius="5" 
				Background="White"
                BorderBrush="LightGray"
                BorderThickness="1"
                >
            <Border.Effect>
                <DropShadowEffect />
            </Border.Effect>
        </Border>
        <TextBlock Text="Select the Binary Package to use" FontSize="18" FontWeight="Bold" Margin="10" Grid.Row="0" />
        <!--<Grid x:Name="PerformanceTestGrid" Grid.Row="1" Margin="10,0" Height="78" VerticalAlignment="Top" UseLayoutRounding="False">
            <Grid.RowDefinitions>
                <RowDefinition Height="26*" />
                <RowDefinition Height="52*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="190*" />
                <ColumnDefinition Width="190*" />
            </Grid.ColumnDefinitions>
            <Border BorderBrush="SteelBlue" BorderThickness="1" Grid.ColumnSpan="2" Grid.RowSpan="2" Height="78" HorizontalAlignment="Left" Name="border1" VerticalAlignment="Top" Width="380" />
            <TextBlock Text="Perfomance Test Overrides:" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" Height="26" VerticalAlignment="Top" FontWeight="Bold" FontSize="14" Foreground="SteelBlue" Width="334" TextAlignment="Center"></TextBlock>
            <TextBlock Text="Number of Tests:" FontWeight="Bold" Height="20" VerticalAlignment="Top" HorizontalAlignment="Right" Width="107" Foreground="SlateGray" Grid.Row="1" />
            <TextBlock Text="Number of Threads:" FontWeight="Bold" Margin="0,26,0,0" Height="20" VerticalAlignment="Top" HorizontalAlignment="Right" Foreground="SlateGray" Grid.Row="1"/>
            <TextBox x:Name="NumberOfTests" Grid.Column="1" Margin="6,0,0,32" VerticalAlignment="Center" Text="{Binding NumberOfTests, Mode=TwoWay}" Height="20" HorizontalAlignment="Left" Width="55" Grid.Row="1"/>
            <TextBox x:Name="NumberOfThreads" Margin="6,26,0,6" VerticalAlignment="Center" Text="{Binding NumberOfThreads, Mode=TwoWay}" Height="20" Grid.Column="1" HorizontalAlignment="Left" Width="55" Grid.Row="1"/>
        </Grid>-->
        <!--<Grid x:Name="ListGrid" Grid.Row="1" Margin="10,94,10,10">-->
        <Grid x:Name="ListGrid" Grid.Row="1" Margin="10,0,10,10">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="35" x:Name="RowSave" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="75"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>

            <ListBox x:Name="ListPackages" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding PackageNameAndVersion}"/>
                            <TextBlock Text="{Binding LastUpdated}"/>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
                
                <Button Margin="5,5,0,5" Click="ButtonSave_Click">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text=" Select " />
                        <Image
                                Stretch="None"
                                Source="{StaticResource IconSave}"
                                Margin="0,0,5,0"
                                 />
                    </StackPanel>
                </Button>

                <Button Margin="5,5,0,5" Click="ButtonCancel_Click">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text=" Cancel " />
                        <Image
                                Stretch="None"
                                Source="{StaticResource IconCancel}"
                                Margin="0,0,5,0"
                                 />
                    </StackPanel>
                </Button>
            </StackPanel>
        </Grid>
        <QuailControls:ProcessingModalControl Text="{Binding ProcessingText}"
                    ModalVisibility="{Binding IsProcessing, Converter={StaticResource VisibilityConverter}}" />
    </Grid>
</UserControl>
